import { createElement } from 'react'
import * as AntdIcons from '@ant-design/icons'

// 动态设置菜单图标
function LayoutMenuIcon (props: { icon: string }) {
  const { icon } = props
  const antIcon: { [key: string]: any } = AntdIcons
  return createElement(antIcon[icon])
}

export default LayoutMenuIcon
